class NumArray {

    int[] arr;

    public NumArray(int[] nums) {
        arr = nums;
    }

    public int sumRange(int i, int j) {
        int num = 0;
        for (int k = i; k <= j; k++) {
            num += arr[k];
        }
        return num;
    }
}